home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Games / dynAMIte / Developer / E / dynAMIte.e < prev    next >
Text File  |  2001-06-24  |  7KB  |  206 lines

  1. -> NOREV
  2. OPT MODULE
  3. OPT EXPORT
  4.  
  5. MODULE  'exec/nodes',
  6.         'exec/lists',
  7.         'exec/semaphores'
  8.  
  9. -> player.status
  10. ENUM  PA_NONE=0, -> no player
  11.       PA_VISI,   -> visitor
  12.       PA_LOGGEDIN, -> just logged in/after a game
  13.       PA_PLAYING,  -> is in game (no matter if he's dead)
  14.       PA_COUNTDOWN, -> this is of no use. players only have this status if they logged in.
  15.       PA_DEAD, -> this is of no use, it's not meant to see if a player is
  16.                -> actually dead.  use player.dead instead.  it's only set
  17.                -> after a successfull login for the other players
  18.       PA_WON -> a player has this status if he won the last round
  19.  
  20. -> dynasema.gamerunning
  21. ENUM  GAME_CLOSEGAME=0, -> transitional state to GAME_MENU after connection got closed
  22.       GAME_MENU,        -> game is in menu eg: login screen
  23.       GAME_ENDGAME,     -> transitional state to GAME_MENU after effect has been drawn
  24.       GAME_EFFECT,      -> game draws effect after a match
  25.       GAME_COUNTDOWN,   -> game is doing the countdown
  26.       GAME_GAME,        -> game is running
  27.       GAME_HURRYUP      -> game is running and is in hurry up mode
  28.  
  29. ENUM  DIR_NONE=-1,
  30.       DIR_DOWN,
  31.       DIR_RIGHT,
  32.       DIR_LEFT,
  33.       DIR_UP
  34.  
  35. CONST SPEED_NORMAL=4,
  36.       SPEED_SLOW=3,
  37.       SPEED_FAST=6
  38.  
  39. CONST BLOCK_FAKEBLOCK=-1,    -> used for remote/kick bombs which are placed into the map
  40.       BLOCK_NOBLOCK=0,       -> empty field
  41.       BLOCK_HARDBLOCK=1,     -> non-destroyable block
  42.       BLOCK_DESTROYABLE=2,   -> destroyable block
  43.       BLOCK_BOMB=3,          -> normal bomb
  44.       BLOCK_BORDERWALL1=4,   -> borderblocks are equal to hardblock
  45.       BLOCK_BORDERWALL2=5,
  46.       BLOCK_BORDERWALL3=6,
  47.       BLOCK_BORDERWALL4=7,
  48.       BLOCK_BORDERWALL5=8,
  49.       BLOCK_BORDERWALL6=9,
  50.  
  51.       BLOCK_ADDBOMB=19    -> block which contains a bomb
  52.  
  53. ENUM  BO_EXPANDFLAME=1, -> types for bonusgrid
  54.       BO_ADDBOMB,
  55.       BO_FLAMEMAX,
  56.       BO_BOMBMAX,
  57.       BO_RANDOMWALL,  -> 5
  58.       BO_BOMBS2BLOCKS,
  59.       BO_DROPALL,
  60.       BO_EXPLALL,
  61.       BO_FASTER,
  62.       BO_SLOWER,      -> 10
  63.       BO_SHORTERFUSE,
  64.       BO_LONGERFUSE,
  65.       BO_SHORTERFLAME,
  66.       BO_SWAPCONTROLSRL,
  67.       BO_FEWERBOMBS,  -> 15
  68.       BO_NODROP,
  69.       BO_SHIELD,
  70.       BO_STANDSTILL,
  71.       BO_TELEPORT,
  72.       BO_REMOTEBOMB,  -> 20
  73.       BO_BACK2BASIC,
  74.       BO_KICKBOMB,
  75.       BO_SABER,
  76.       BO_SWAPCONTROLSUD,
  77.       BO_MAGNET,      -> 25
  78.       BO_PHOENIX,
  79.       BO_DOHURRYUP,
  80.       BO_INVISIBLE,
  81.       BO_DUELL,
  82.       BO_AFTERBURNER,  -> 30
  83.       BO_MAX
  84.  
  85. ENUM  BOMB_NORMAL=0,  -> normal bomb
  86.       BOMB_GEN,       -> predefined bomb (map)
  87.       BOMB_REMOTE,    -> remote bomb
  88.       BOMB_KICK       -> kick bomb
  89.  
  90. OBJECT serverdata
  91.   servername[34]:ARRAY -> name of the server
  92.   sysopname[18]:ARRAY  -> name of the sysop
  93.   maxslots:INT         -> how many players allows this server
  94.   maxobservers:INT     -> how many observers allows this server
  95. ENDOBJECT
  96.  
  97. OBJECT tempbomb
  98.   ln:mln
  99.  
  100.   x:INT -> x blockpos
  101.   y:INT -> y blockpos
  102.  
  103.   x1:INT -> x pos (pixel)
  104.   y1:INT -> y pos (pixel)
  105.  
  106.   fuse:INT -> >0 bomb is still ticking; =0 bomb is going to explode
  107.   range:LONG -> flamlength
  108.  
  109.   dir:INT -> in case of kick/remote bomb holds the direction
  110.  
  111.   originx:INT -> holds the x/y pos (block) where the bomb was placed
  112.   originy:INT -> (useful to find kick/remotebombs)
  113.  
  114.   type:INT -> is set to one of BOMB_
  115.  
  116.   /******* private data *******/
  117.  
  118. ENDOBJECT
  119.  
  120. OBJECT player
  121.   num:INT
  122.   status:LONG -> this is set to one of PA_#?
  123.  
  124.   dead:INT -> >0 = player is alive
  125.  
  126.   x:INT -> xpos (pixel) + border (24 pixel)
  127.   y:INT -> ypos (pixel) + border (16 pixel)
  128.  
  129.   px:INT -> xpos (block number)
  130.   py:INT -> ypos (block number)
  131.  
  132.   bombc:INT -> how many bombs this player has currently ticking
  133.   maxkickbombs:INT -> how many kickbombs this player has
  134.   bomblist:PTR TO mlh -> doubly linked list of bombs belonging to this player
  135.   remotebomb:PTR TO tempbomb -> pointer to a bomb of bomblist which is his remotebomb else 0
  136.   kickbomb:PTR TO tempbomb -> pointer to a bomb of bomblist which is his kickbomb else 0
  137.  
  138.   maxrange:INT -> flamelen of player ranging from 2 to 15
  139.   maxbombs:INT -> how many bombs this player can drop
  140.   fuselen:INT -> fuselength of bombs the player can drop
  141.   speed:INT -> player speed; SPEED_NORMAL=4, SPEED_SLOW=3, SPEED_FAST=6
  142.   speedc:INT -> >0 = player has other speed (SPEED_SLOW, SPEED_FAST)
  143.  
  144.   swaprlc:INT -> >0 = swaped horizontal controls
  145.   swapudc:INT -> >0 = swaped vertical controls
  146.   nodropc:INT -> >0 = player can't drop bombs
  147.  
  148.   shieldc:INT -> >0 = player has shield
  149.  
  150.   standstillc:INT -> >0 = player can't move
  151.  
  152.   invisiblec:INT -> >0 = player is invisible
  153.  
  154.   afterburnerc:INT -> >0 = player has afterburner
  155.  
  156.   b2bc:INT
  157.  
  158.   flamethrowerc:INT -> >0 = player has lightsabre
  159.   flamethrowerdir:INT -> direction of lightsabre
  160.   flamethrowerr:INT -> range of light sabre
  161.  
  162.   magnetc:INT -> >0 = this player has magnet enabled
  163.   magnetdir:INT -> direction of magnet
  164.  
  165.   name[34]:ARRAY -> players name
  166.   system[64]:ARRAY -> players systemstring
  167.  
  168.   /******* private data *******/
  169.  
  170. ENDOBJECT
  171.  
  172. OBJECT dynamitesemaphore
  173.   sema:ss -> embedded signalsemaphore
  174.  
  175.   opencnt:LONG -> you must increase this by 1 if you are going to use the
  176.                -> semaphore the first time. decrease it by 1 if you are done
  177.  
  178.   quit:LONG -> dynamite will set this to 1 if it wants to quit.  Check this
  179.             -> from time to time and end your program if quit gets set to 1
  180.  
  181.   gamerunning:LONG -> is set to one of GAME_#?
  182.  
  183.   frames:LONG -> once a game is running this long will be increased by 1
  184.               -> every frame.
  185.  
  186.   walk:LONG     -> set to one of DIR_ to make the player move or stop
  187.   drop:LONG     -> set to 1 to drop a bomb
  188.   dropkick:LONG -> set to 1 to drop a kickbomb
  189.  
  190.   thisplayer:LONG -> number of this player in playerarray (>7 = observer)
  191.   player:PTR TO LONG -> array ptr of players (15 entries max; >7 = observer)
  192.  
  193.   mapwidth:LONG  -> holds the width of the map in blocks
  194.   mapheight:LONG -> holds the height of the map in blocks
  195.  
  196.   grid:PTR TO LONG -> array ptr to the actual map (29 entries max). each entry contains 1 line of the map without powerups
  197.   bonusgrid:PTR TO LONG -> array ptr to the bonus map (29 entries max). each entry contains 1 line of the bonusmap
  198.  
  199.   addbubble[10]:ARRAY -> any string copied to this array will be shown as bubble
  200.                       -> dynamite will clear the string after successful
  201.                       -> creation of the bubble
  202.  
  203.   serverdata:PTR TO serverdata -> see serverdata for details
  204.  
  205. ENDOBJECT
  206.